package org.example.service;

import java.util.Scanner;

public class Work3 {
    /**
     * 解析url=https//www.baidu.com/s2wd=易牛云&Wt=java'，将wd和wt后面的值放入一个数组中。
     * url=https//www.baidu.com/s2wd=易牛云&Wt=java
     */

    public void info() {
        System.out.println("输入解析的网址");
        Scanner sc = new Scanner(System.in);
        String info = sc.next();
        String[] info2 = info.split("//");
        String info3[] = info2[1].split("/");
        String info4[] = info3[1].split("&");
        for (String a : info4
        ) {
            String b[] = a.split("=");
            for (String c:b
            ) {
                System.out.println(c);
            }
        }
    }

    public static void main(String[] args) {
        Work3 work3 = new Work3();
        work3.info();
    }
}
